import useIntervalFn from "."

const IntervalFnComponent = () => {
  const { start, stop } = useIntervalFn(() => { console.log('可恶的星期一!')}, 1000);

  return (
    <div>
      <button onClick={start}>开启任务</button><br />
      <button onClick={stop}>结束任务</button>
    </div>
  )
}

export default IntervalFnComponent;